
namespace KlearTweet.Client.DataPresentation
{
    public class AccountController
    {
        public AccountView View { get; set; }

        public AccountController(Model.Account entity, Search.DataProvider dataProvider)
        {
            View = new AccountView { Entity = entity }; // TODO: Caching!

            View.TweetsFromFriends.Click += (s, e) => dataProvider.SearchTweetsFromFriends(entity);
            View.TweetsFromUser.Click += (s, e) => dataProvider.SearchTweetsFromUser(entity);
        }
    }
}